<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			.form{width:400px;margin:0 auto;}
			.form>*{width:90%;}
			.form>input[type=radio]{width:40%;}
			.ageTitle{cursor: pointer;}
			.ageTitle:hover{background: yellow;}
		</style>
	</head>
	<body>
		<table align="center" border="1" width="60%">
			<tr>
				<th>编号</th>
				<th>姓名</th>
				<th class="ageTitle" ng-click="sortQuery()">年龄</th>
				<th>性别</th>
				<th>操作</th>
			</tr>
			<tr ng-repeat="user in list">
				<td>{{$index+1}}</td>
				<td><a ng-href="#/view/{{$index}}">{{user.username}}</a></td>
				<td>{{user.userage}}</td>
				<td>{{user.usersex}}</td>
				<td>
					<a href="javascript:;" ng-click="del(user._id)">删除</a>
					<input type="checkbox"  ng-checked="checks" value="{{user._id}}">
					<a href="javascript:;" ng-click="update(user._id,$index)">修改</a>
				</td>
			</tr>
			<tr align="center">
				<td><a href="javascript:;" ng-click="replace(1)">首页</a></td>
				<td><a href="javascript:;" ng-click="replace(page-1)">上一页</a></td>
				<td>当前：第{{page}}页,共计：{{total}}页</td>
				<td><a href="javascript:;" ng-click="replace(page+1)">下一页</a></td>
				<td><a href="javascript:;" ng-click="replace(total)">尾页</a></td>
			</tr>
		</table>
		全选：<input type="checkbox" ng-click="checkAll()" ng-checked="checks">
		<button ng-click="delAll()">删除</button>
		<div class="form">
			<input type="text" placeholder="姓名" ng-model="name">
			<input type="number" placeholder="年龄" ng-model="age">
			<input type="radio"  ng-model="sex" value="男">男
			<input type="radio"  ng-model="sex" value="女">女<br>
			<input type="hidden" ng-model="id">
			<button ng-click="save()">保存</button>
		</div>
	</body>
</html>
